package com.situ.scientific.service.impl;

import com.situ.scientific.dao.IAuthDao;
import com.situ.scientific.dao.impl.AuthDaoImpl;
import com.situ.scientific.pojo.Auth;
import com.situ.scientific.pojo.query.AuthQuery;
import com.situ.scientific.service.IAuthService;
import com.situ.scientific.util.PageRusult;

import java.util.List;

public class AuthserviceImpl implements IAuthService {
    IAuthDao authDao = new AuthDaoImpl();
    @Override
    public PageRusult<Auth> selectByPage(AuthQuery authQuery) {
        List<Auth> list = authDao.selectByPage(authQuery);
        int totalCount = authDao.totalCount(authQuery);
        PageRusult<Auth> pageRusult = new PageRusult(0,"",totalCount,list);
        return pageRusult;
    }

    @Override
    public void add(Auth auth) {

    }

    @Override
    public int deleteById(int id) {
        return 0;
    }

    @Override
    public Auth selectById(String id) {
        return null;
    }

    @Override
    public void updateStatus(String id, int status) {

    }

    @Override
    public void update(Auth auth) {

    }

    @Override
    public void deleteAll(String[] ids) {

    }
    @Override
    public List<Auth> selectByRole(Integer role) {
        return authDao.selectByRole(role);
    }
}
